package com.lkk.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.lkk.data.Log;
/**
 * 公共参数工具类
 * @author admin
 *
 */
public class CommonUtil {
	//用户Id
	public static String userId;
	
	/**
	 * 通过响应主体获取token
	 * @param responseBody
	 */
	public static void getToken(JSONObject responseBody) {
		//获取record集合
		String recordString = responseBody.getString("record");
		JSONObject recordJson = JSON.parseObject(recordString);
		//在record中获取token值
		Constant.TOKENRESULT = recordJson.getString(Constant.TOKEN);
		Log.info("获取的token值:"+Constant.TOKENRESULT);
	}

}
